﻿namespace KinectPlayer
{
    using System.Windows;
    using System.Windows.Controls;
    using System.Windows.Media.Animation;

    /// <summary>
    /// Interaction logic for SlideLeft.xaml
    /// </summary>
    public partial class SlideLeft : UserControl
    {
        #region Constants and Fields

        private readonly Storyboard sb;

        #endregion

        #region Constructors and Destructors

        public SlideLeft()
        {
            this.InitializeComponent();

            this.sb = (Storyboard)this.Resources["loading"];
            this.SizeChanged += this.SliderLeft_SizeChanged;
            this.Loaded += this.SliderLeft_Loaded;
        }

        #endregion

        #region Methods

        private void SliderLeft_Loaded(object sender, RoutedEventArgs e)
        {
        }

        private void SliderLeft_SizeChanged(object sender, SizeChangedEventArgs e)
        {
            this.sb.Begin();
        }

        #endregion
    }
}